import java.util.Scanner;

public class a020 {
	public static int No(char c) {
		if(c == 'A') { return 10; }
		else if(c == 'B') { return 11; }
		else if(c == 'C') { return 12; }
		else if(c == 'D') { return 13; }
		else if(c == 'E') { return 14; }
		else if(c == 'F') { return 15; }
		else if(c == 'G') { return 16; }
		else if(c == 'H') { return 17; }
		else if(c == 'I') { return 34; }
		else if(c == 'J') { return 18; }
		else if(c == 'K') { return 19; }
		else if(c == 'L') { return 20; }
		else if(c == 'M') { return 21; }
		else if(c == 'N') { return 22; }
		else if(c == 'O') { return 35; }
		else if(c == 'P') { return 23; }
		else if(c == 'Q') { return 24; }
		else if(c == 'R') { return 25; }
		else if(c == 'S') { return 26; }
		else if(c == 'T') { return 27; }
		else if(c == 'U') { return 28; }
		else if(c == 'V') { return 29; }
		else if(c == 'W') { return 32; }
		else if(c == 'X') { return 30; }
		else if(c == 'Y') { return 31; }
		else if(c == 'Z') { return 33; }
		return 0;
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String input, output;
		int idSum;
		int counter;
		
		while(sc.hasNext()) {
			input = sc.nextLine();
			
			idSum = ( ( No(input.charAt(0)) % 10 * 9 ) + ( No(input.charAt(0)) / 10 ) );
			counter = 1;
			for(int i = 8; i >= 1; i--) {
				idSum += ( Integer.parseInt(input.substring(counter, counter + 1)) * i );
				counter++;
			}
			idSum += Integer.parseInt(input.substring(counter, counter + 1));
			
			if(idSum % 10 == 0) {
				output = "real";
			} else {
				output = "fake";
			}
			
			System.out.println(output);
		} // next
	} // main
}